home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <graphics.h>
-
- main()
- {
- int graphdriver = DETECT,graphmode;
- int i,maxx;
- char buffer[80];
-
- /* Initialize the graphics system */
- initgraph(&graphdriver,&graphmode,"c:\\turboc");
- outtextxy(10,20,"Demonstrating getmaxx");
-
- /* Get maximum x coordinate and shit it */
- maxx = getmaxx();
- sprintf(buffer,"Maximum x coordinate is %d",maxx);
- outtextxy(10,60,buffer);
- /* Give user a chance to see the result */
- getch();
- closegraph();
- }